﻿package tk.mystudio.permission.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 账户角色关联类
 * @author jiangkunpeng
 * @since 2011-3-16 
 * @version 1.0
 */
@Entity
@Table(name = "account_role")
public class AccountRole implements Serializable {

	private static final long serialVersionUID = 735748867680045248L;

	/**
	 * 账户编号
	 */
	@Id
	@Column(name = "account_id", columnDefinition = "int")
	protected Integer accountId;
	
	/**
	 * 角色编号
	 */
	@Id
	@Column(name = "role_id", columnDefinition = "int")
	protected Integer roleId;

	public Integer getAccountId() {
		return accountId;
	}

	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("AccountRole [accountId=");
		builder.append(accountId);
		builder.append(", roleId=");
		builder.append(roleId);
		builder.append("]");
		return builder.toString();
	}
	
}
